﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ServerBuildConsole.Views.ChildWindows
{
    public partial class BuildDetails : ChildWindow
    {
        public BuildDetails()
        {
            InitializeComponent();
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (((ComboBoxItem)boxOperatingSystem.SelectedItem).Content.Equals("Other-Explain Below"))
            {
                OtherOSBox.Visibility = System.Windows.Visibility.Visible;
                OtherOSLabel.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                OtherOSBox.Visibility = System.Windows.Visibility.Collapsed;
                OtherOSLabel.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        private void comboBox2_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (((ComboBoxItem)boxDomain.SelectedItem).Content.Equals("Other-Explain Below"))
            {
                OtherDomainLabel.Visibility = System.Windows.Visibility.Visible;
                boxOtherDomain.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                OtherDomainLabel.Visibility = System.Windows.Visibility.Collapsed;
                boxOtherDomain.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        private void comboBox3_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }

        private void ChildWindow_Closed(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            login1 details = new login1();
            details.Closed += new EventHandler(details_Closed);
            details.Show();
        }

        void details_Closed(object sender, EventArgs e)
        {
            boxDriveSize.Text = ((login1)sender).textBox1.Text;

        } 
    }
}


